<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1,maximum-scale=1">
	<title>中环网登录页面</title>
	<link rel="stylesheet" type="text/css" href="/pxm/css/common.css">
	<link rel="stylesheet" type="text/css" href="/pxm/css/login.css">
</head>
<body>
	<div class="login_cont">
		<div class="login_nav">
			<div class="nav_slider">
			   <a href="/login" class="signup focus">登录</a>
			   <a href="/register" class="signup">注册</a>
			</div>
		</div>
		<form method="post" action="" id="rows">
			<div class="input_signup active">
			    <?php echo csrf_field()?>
				<input class="input" name="uname" type="text" placeholder="用户名">
				<div class="hint"></div>
				<input class="input" name="upassword" type="password" placeholder="密码（不少于 6 位）">
				<div class="hint"></div>
				<input type="button" class="submit" value="登录">
			</div>
		</form>
	</div>
</body>
</html>
<script src="/pxm/css/jquery-1.4.4.js"></script>
<script>
    $(".submit").click(function(){
		var formData=$("#rows").serialize();
		$.ajax({
			type:"post",
			url:'/login_ok',
			data:formData,
			success:function(data){
				alert(data['name']);
				if(data['code']==1){
					location.href=data['url'];
				}
			}
		});
	});
</script>
